Skip to content

[#382] Fix E2E indexer verification#383

Merged
realproject7 merged 3 commits intomainfrom
task/382-e2e-verify-fixes
Mar 20, 2026
Merged

[#382] Fix E2E indexer verification#383
realproject7 merged 3 commits intomainfrom
task/382-e2e-verify-fixes

Conversation

@realproject7
Copy link
Copy Markdown
Owner

Summary

  • Update hardcoded StoryFactory mainnet address to v3 (0x337c5b96...) in lib/contracts/constants.ts and packages/sdk/src/constants.ts
  • Fix e2e-verify.ts to resolve actual storyline IDs and token addresses from on-chain broadcast receipts instead of trusting simulated e2e-results.json values (forge simulation state diverges from broadcast reality)
  • Handle 0-supply gracefully in V5 checks (E2E test burns all tokens back)
  • Trade 404s were a cascade from simulated token addresses not matching real on-chain data — resolved by receipt resolution

Result: 118/119 PASS (1 transient RPC rate-limit failure on V5.4 tokenBond call)

Fixes #382

Test plan

  • npx tsx scripts/e2e-verify.ts --from-file — 118/119 PASS
  • V1 (storylines): all PASS including Supabase persistence
  • V2 (plots): all PASS
  • V3 (trades): all PASS — trade endpoint works correctly
  • V4 (donations): all PASS
  • V5 (price/TVL): 3/4 PASS, 1 transient 429 rate limit
  • V6 (content hash): all PASS
  • V7 (idempotency): all PASS
  • V8 (error handling): all PASS

🤖 Generated with Claude Code

1. Update hardcoded StoryFactory address to v3 (0x337c5b96...)
   in lib/contracts/constants.ts and SDK constants.
2. Fix e2e-verify.ts to resolve actual storyline IDs and token
   addresses from on-chain receipts instead of trusting simulated
   values from e2e-results.json (forge simulation diverges from
   broadcast reality).
3. Handle 0-supply gracefully in V5 (E2E burns all tokens back).

Result: 118/119 PASS (1 transient RPC rate-limit failure).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown
Collaborator

@project7-interns project7-interns left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Receipt resolution correctly fixes the forge simulation vs broadcast divergence — real on-chain IDs/tokens decoded from StorylineCreated events. Address updates consistent, V5 0-supply handling correct. CI green.

Minor: resolveTokenAddress() may now be dead code since resolveStorylinesFromReceipts() handles all lookups — consider removing if unused. Not blocking.

Copy link
Copy Markdown
Collaborator

@project7-interns project7-interns left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: REQUEST CHANGES

Summary

The receipt-resolution work looks directionally right, but the PR still misses one of issue #382's required production constants updates.

Findings

  • [medium] Mainnet deployment block is still the old v2 value, so server-side event queries can still start from the wrong block after the v3 address switch.
    • File: lib/contracts/constants.ts:28
    • Suggestion: update the mainnet deployment block to the v3 deployment block (, from the redeploy artifact at ).

Decision

Requesting changes because issue #382 explicitly requires both the v3 address and deployment-block update in the web app constants, and leaving the old block risks incomplete indexing on the new deployment.

Copy link
Copy Markdown
Collaborator

@project7-interns project7-interns left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: REQUEST CHANGES

Summary

The receipt-resolution work looks directionally right, but the PR still misses one of issue #382's required production constants updates.

Findings

  • [medium] Mainnet deployment block is still the old v2 value, so server-side event queries can still start from the wrong block after the v3 address switch.
    • File: lib/contracts/constants.ts:28
    • Suggestion: update the mainnet deployment block to the v3 deployment block 43,609,150 from the redeploy artifact.

Decision

Requesting changes because issue #382 explicitly requires both the v3 address and deployment-block update in the web app constants, and leaving the old block risks incomplete indexing on the new deployment.

realproject7 and others added 2 commits March 20, 2026 13:26
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown
Collaborator

@project7-interns project7-interns left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: APPROVE

Summary

The missing deployment-block update is fixed, and the follow-up cleanup removes the unused helper noted in review. The production constants and SDK constants now both point at the v3 deployment correctly.

Findings

  • None.

Decision

Approved. and now use the v3 deploy block 43,609,150 and the v3 StoryFactory address, so the remaining review blocker is resolved.

Copy link
Copy Markdown
Collaborator

@project7-interns project7-interns left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: APPROVE

Summary

The missing deployment-block update is fixed, and the follow-up cleanup removes the unused helper noted in review. The production constants and SDK constants now both point at the v3 deployment correctly.

Findings

  • None.

Decision

Approved. The web app and SDK constants now use the v3 deploy block 43,609,150 and the v3 StoryFactory address, so the remaining review blocker is resolved.

@realproject7 realproject7 merged commit 65fd445 into main Mar 20, 2026
1 check passed
@realproject7 realproject7 deleted the task/382-e2e-verify-fixes branch March 20, 2026 13:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] E2E Indexer Verification Failures — Contract Address Filter + Price Read After Full Burn

2 participants